﻿// DuiChatClient.cpp : 定义应用程序的入口点。
//

#include "stdafx.h"

#include "Application.h"
#include "ChatMainWindow.h"
#include "ChatModule.h"
#include "ChatServer.h"

int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
	DuiApplication app(hInstance);

	ChatMainWindow mainWindow;

	ChatServer server;
	server.Run();

	ChatLogicModule chatModule;
	mainWindow.SetChatLogicModule(&chatModule);

	mainWindow.InitResource();

	mainWindow.Create(NULL, _T("DuiChat"), UI_WNDSTYLE_FRAME, 0L, 0, 0, 990, 690);

	mainWindow.CenterWindow();

	chatModule.Run();

	mainWindow.ShowModal();

	return app.execute();
}

